Integrand size = 39, antiderivative size = 83 \[ \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {g \sin (e+f x)} (c+d \sin (e+f x))} \, dx=-\frac {2 \sqrt {a} \arctan \left (\frac {\sqrt {a} \sqrt {c} \sqrt {g} \cos (e+f x)}{\sqrt {c+d} \sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}\right )}{\sqrt {c} \sqrt {c+d} f \sqrt {g}} \]
-2*arctan(cos(f*x+e)*a^(1/2)*c^(1/2)*g^(1/2)/(c+d)^(1/2)/(g*sin(f*x+e))^(1 /2)/(a+a*sin(f*x+e))^(1/2))*a^(1/2)/f/c^(1/2)/(c+d)^(1/2)/g^(1/2)
Result contains complex when optimal does not.
Time = 2.71 (sec) , antiderivative size = 436, normalized size of antiderivative = 5.25 \[ \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {g \sin (e+f x)} (c+d \sin (e+f x))} \, dx=\frac {\left (\frac {1}{4}+\frac {i}{4}\right ) g \left (\sqrt {c+i \sqrt {-c^2+d^2}} \left (i c-i d+\sqrt {-c^2+d^2}\right ) \arctan \left (\frac {d-\left (-i c+\sqrt {-c^2+d^2}\right ) (\cos (e+f x)+i \sin (e+f x))}{\sqrt {2} \sqrt {c} \sqrt {c+i \sqrt {-c^2+d^2}} \sqrt {-1+\cos (2 (e+f x))+i \sin (2 (e+f x))}}\right )+\sqrt {c-i \sqrt {-c^2+d^2}} \left (-i c+i d+\sqrt {-c^2+d^2}\right ) \arctan \left (\frac {d+\left (i c+\sqrt {-c^2+d^2}\right ) (\cos (e+f x)+i \sin (e+f x))}{\sqrt {2} \sqrt {c} \sqrt {c-i \sqrt {-c^2+d^2}} \sqrt {-1+\cos (2 (e+f x))+i \sin (2 (e+f x))}}\right )\right ) \sqrt {a (1+\sin (e+f x))} \left (\cos \left (\frac {3}{2} (e+f x)\right )-i \sin \left (\frac {3}{2} (e+f x)\right )\right ) (-1+\cos (2 (e+f x))+i \sin (2 (e+f x)))^{3/2}}{\sqrt {2} \sqrt {c} d \sqrt {-c^2+d^2} f \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) (g \sin (e+f x))^{3/2}} \]
((1/4 + I/4)*g*(Sqrt[c + I*Sqrt[-c^2 + d^2]]*(I*c - I*d + Sqrt[-c^2 + d^2] )*ArcTan[(d - ((-I)*c + Sqrt[-c^2 + d^2])*(Cos[e + f*x] + I*Sin[e + f*x])) /(Sqrt[2]*Sqrt[c]*Sqrt[c + I*Sqrt[-c^2 + d^2]]*Sqrt[-1 + Cos[2*(e + f*x)] + I*Sin[2*(e + f*x)]])] + Sqrt[c - I*Sqrt[-c^2 + d^2]]*((-I)*c + I*d + Sqr t[-c^2 + d^2])*ArcTan[(d + (I*c + Sqrt[-c^2 + d^2])*(Cos[e + f*x] + I*Sin[ e + f*x]))/(Sqrt[2]*Sqrt[c]*Sqrt[c - I*Sqrt[-c^2 + d^2]]*Sqrt[-1 + Cos[2*( e + f*x)] + I*Sin[2*(e + f*x)]])])*Sqrt[a*(1 + Sin[e + f*x])]*(Cos[(3*(e + f*x))/2] - I*Sin[(3*(e + f*x))/2])*(-1 + Cos[2*(e + f*x)] + I*Sin[2*(e + f*x)])^(3/2))/(Sqrt[2]*Sqrt[c]*d*Sqrt[-c^2 + d^2]*f*(Cos[(e + f*x)/2] + Si n[(e + f*x)/2])*(g*Sin[e + f*x])^(3/2))
Time = 0.39 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {3042, 3409, 218}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sqrt {a \sin (e+f x)+a}}{\sqrt {g \sin (e+f x)} (c+d \sin (e+f x))} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sqrt {a \sin (e+f x)+a}}{\sqrt {g \sin (e+f x)} (c+d \sin (e+f x))}dx\) |
\(\Big \downarrow \) 3409 |
\(\displaystyle -\frac {2 a \int \frac {1}{\frac {c \cos (e+f x) \cot (e+f x) a^2}{\sin (e+f x) a+a}+(c+d) a}d\frac {a \cos (e+f x)}{\sqrt {g \sin (e+f x)} \sqrt {\sin (e+f x) a+a}}}{f}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle -\frac {2 \sqrt {a} \arctan \left (\frac {\sqrt {a} \sqrt {c} \sqrt {g} \cos (e+f x)}{\sqrt {c+d} \sqrt {a \sin (e+f x)+a} \sqrt {g \sin (e+f x)}}\right )}{\sqrt {c} f \sqrt {g} \sqrt {c+d}}\) |
(-2*Sqrt[a]*ArcTan[(Sqrt[a]*Sqrt[c]*Sqrt[g]*Cos[e + f*x])/(Sqrt[c + d]*Sqr t[g*Sin[e + f*x]]*Sqrt[a + a*Sin[e + f*x]])])/(Sqrt[c]*Sqrt[c + d]*f*Sqrt[ g])
3.1.26.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/(Sqrt[(g_.)*sin[(e_.) + (f_. )*(x_)]]*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])), x_Symbol] :> Simp[-2*(b/f ) Subst[Int[1/(b*c + a*d + c*g*x^2), x], x, b*(Cos[e + f*x]/(Sqrt[g*Sin[e + f*x]]*Sqrt[a + b*Sin[e + f*x]]))], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0]
Leaf count of result is larger than twice the leaf count of optimal. \(504\) vs. \(2(63)=126\).
Time = 3.17 (sec) , antiderivative size = 505, normalized size of antiderivative = 6.08
method | result | size |
default | \(-\frac {2 \sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, \sqrt {a \left (1+\sin \left (f x +e \right )\right )}\, \left (\sqrt {-\left (c -d \right ) \left (c +d \right )}\, \sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}+d \right ) c}\, \operatorname {arctanh}\left (\frac {\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, c}{\sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}-d \right ) c}}\right )+\operatorname {arctanh}\left (\frac {\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, c}{\sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}-d \right ) c}}\right ) \sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}+d \right ) c}\, c -\operatorname {arctanh}\left (\frac {\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, c}{\sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}-d \right ) c}}\right ) \sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}+d \right ) c}\, d -\sqrt {-\left (c -d \right ) \left (c +d \right )}\, \sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}-d \right ) c}\, \arctan \left (\frac {\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, c}{\sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}+d \right ) c}}\right )+\arctan \left (\frac {\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, c}{\sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}+d \right ) c}}\right ) \sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}-d \right ) c}\, c -\arctan \left (\frac {\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, c}{\sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}+d \right ) c}}\right ) \sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}-d \right ) c}\, d \right ) \left (1+\cos \left (f x +e \right )\right )}{f \left (\cos \left (f x +e \right )+\sin \left (f x +e \right )+1\right ) \sqrt {g \sin \left (f x +e \right )}\, \sqrt {-\left (c -d \right ) \left (c +d \right )}\, \sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}-d \right ) c}\, \sqrt {\left (\sqrt {-\left (c -d \right ) \left (c +d \right )}+d \right ) c}}\) | \(505\) |
-2/f*(csc(f*x+e)-cot(f*x+e))^(1/2)*(a*(1+sin(f*x+e)))^(1/2)*((-(c-d)*(c+d) )^(1/2)*(((-(c-d)*(c+d))^(1/2)+d)*c)^(1/2)*arctanh((csc(f*x+e)-cot(f*x+e)) ^(1/2)*c/(((-(c-d)*(c+d))^(1/2)-d)*c)^(1/2))+arctanh((csc(f*x+e)-cot(f*x+e ))^(1/2)*c/(((-(c-d)*(c+d))^(1/2)-d)*c)^(1/2))*(((-(c-d)*(c+d))^(1/2)+d)*c )^(1/2)*c-arctanh((csc(f*x+e)-cot(f*x+e))^(1/2)*c/(((-(c-d)*(c+d))^(1/2)-d )*c)^(1/2))*(((-(c-d)*(c+d))^(1/2)+d)*c)^(1/2)*d-(-(c-d)*(c+d))^(1/2)*(((- (c-d)*(c+d))^(1/2)-d)*c)^(1/2)*arctan((csc(f*x+e)-cot(f*x+e))^(1/2)*c/(((- (c-d)*(c+d))^(1/2)+d)*c)^(1/2))+arctan((csc(f*x+e)-cot(f*x+e))^(1/2)*c/((( -(c-d)*(c+d))^(1/2)+d)*c)^(1/2))*(((-(c-d)*(c+d))^(1/2)-d)*c)^(1/2)*c-arct an((csc(f*x+e)-cot(f*x+e))^(1/2)*c/(((-(c-d)*(c+d))^(1/2)+d)*c)^(1/2))*((( -(c-d)*(c+d))^(1/2)-d)*c)^(1/2)*d)*(1+cos(f*x+e))/(cos(f*x+e)+sin(f*x+e)+1 )/(g*sin(f*x+e))^(1/2)/(-(c-d)*(c+d))^(1/2)/(((-(c-d)*(c+d))^(1/2)-d)*c)^( 1/2)/(((-(c-d)*(c+d))^(1/2)+d)*c)^(1/2)
Leaf count of result is larger than twice the leaf count of optimal. 168 vs. \(2 (63) = 126\).
Time = 0.89 (sec) , antiderivative size = 1303, normalized size of antiderivative = 15.70 \[ \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {g \sin (e+f x)} (c+d \sin (e+f x))} \, dx=\text {Too large to display} \]
[1/4*sqrt(-a/((c^2 + c*d)*g))*log(((128*a*c^4 + 256*a*c^3*d + 160*a*c^2*d^ 2 + 32*a*c*d^3 + a*d^4)*cos(f*x + e)^5 + a*c^4 + 4*a*c^3*d + 6*a*c^2*d^2 + 4*a*c*d^3 + a*d^4 - (128*a*c^4 + 192*a*c^3*d + 64*a*c^2*d^2 - 4*a*c*d^3 - a*d^4)*cos(f*x + e)^4 - 2*(208*a*c^4 + 368*a*c^3*d + 195*a*c^2*d^2 + 32*a *c*d^3 + a*d^4)*cos(f*x + e)^3 + 2*(64*a*c^4 + 94*a*c^3*d + 29*a*c^2*d^2 - 4*a*c*d^3 - a*d^4)*cos(f*x + e)^2 - 8*(51*c^5 + 110*c^4*d + 76*c^3*d^2 + 18*c^2*d^3 + c*d^4 + (16*c^5 + 40*c^4*d + 34*c^3*d^2 + 11*c^2*d^3 + c*d^4) *cos(f*x + e)^4 - (24*c^5 + 52*c^4*d + 35*c^3*d^2 + 7*c^2*d^3)*cos(f*x + e )^3 - (66*c^5 + 149*c^4*d + 110*c^3*d^2 + 29*c^2*d^3 + 2*c*d^4)*cos(f*x + e)^2 + (25*c^5 + 53*c^4*d + 35*c^3*d^2 + 7*c^2*d^3)*cos(f*x + e) - (51*c^5 + 110*c^4*d + 76*c^3*d^2 + 18*c^2*d^3 + c*d^4 - (16*c^5 + 40*c^4*d + 34*c ^3*d^2 + 11*c^2*d^3 + c*d^4)*cos(f*x + e)^3 - (40*c^5 + 92*c^4*d + 69*c^3* d^2 + 18*c^2*d^3 + c*d^4)*cos(f*x + e)^2 + (26*c^5 + 57*c^4*d + 41*c^3*d^2 + 11*c^2*d^3 + c*d^4)*cos(f*x + e))*sin(f*x + e))*sqrt(a*sin(f*x + e) + a )*sqrt(g*sin(f*x + e))*sqrt(-a/((c^2 + c*d)*g)) + (289*a*c^4 + 480*a*c^3*d + 230*a*c^2*d^2 + 32*a*c*d^3 + a*d^4)*cos(f*x + e) + (a*c^4 + 4*a*c^3*d + 6*a*c^2*d^2 + 4*a*c*d^3 + a*d^4 + (128*a*c^4 + 256*a*c^3*d + 160*a*c^2*d^ 2 + 32*a*c*d^3 + a*d^4)*cos(f*x + e)^4 + 4*(64*a*c^4 + 112*a*c^3*d + 56*a* c^2*d^2 + 7*a*c*d^3)*cos(f*x + e)^3 - 2*(80*a*c^4 + 144*a*c^3*d + 83*a*c^2 *d^2 + 18*a*c*d^3 + a*d^4)*cos(f*x + e)^2 - 4*(72*a*c^4 + 119*a*c^3*d +...
\[ \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {g \sin (e+f x)} (c+d \sin (e+f x))} \, dx=\int \frac {\sqrt {a \left (\sin {\left (e + f x \right )} + 1\right )}}{\sqrt {g \sin {\left (e + f x \right )}} \left (c + d \sin {\left (e + f x \right )}\right )}\, dx \]
\[ \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {g \sin (e+f x)} (c+d \sin (e+f x))} \, dx=\int { \frac {\sqrt {a \sin \left (f x + e\right ) + a}}{{\left (d \sin \left (f x + e\right ) + c\right )} \sqrt {g \sin \left (f x + e\right )}} \,d x } \]
\[ \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {g \sin (e+f x)} (c+d \sin (e+f x))} \, dx=\int { \frac {\sqrt {a \sin \left (f x + e\right ) + a}}{{\left (d \sin \left (f x + e\right ) + c\right )} \sqrt {g \sin \left (f x + e\right )}} \,d x } \]
Timed out. \[ \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {g \sin (e+f x)} (c+d \sin (e+f x))} \, dx=\int \frac {\sqrt {a+a\,\sin \left (e+f\,x\right )}}{\sqrt {g\,\sin \left (e+f\,x\right )}\,\left (c+d\,\sin \left (e+f\,x\right )\right )} \,d x \]